版权声明:本文为博主原创文章,转载请注明出处:http://blog.jerkybible.com/2013/09/12/2013-09-12-CODE 8 Valid Palindrome/
访问原文「CODE 8. Valid Palindrome」
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,"A man, a plan, a canal: Panama"
is a palindrome."race a car"
isnota palindrome.
Note:
Have you consider that the string might be empty? This is a good question to ask during an interview.
For the purpose of this problem, we define empty string as valid palindrome.
|
|